package com.gupaoedu.pattern.singleton.register;

/**
 * 2019/5/11
 * created by chenpp
 * 枚举式单例(注册式单例的一种)
 */
public enum EnumSingleton {
    EnumSingleton;
    private Object data;
    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
    public  static EnumSingleton getInstance(){
        return EnumSingleton;
    }

}
